﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using RRRSRoguelikeData;

namespace RRRSRoguelike.Entities
{
    public class Weapon : Tile
    {
        private int uses;
        private int maxUses;

        /// <summary>
        /// Constructor for sword. Contains hard code for 3 uses.
        /// </summary>
        /// <param name="position"></param>
        public Weapon(Point position,TileData tileData):base(position, tileData)
        {
            maxUses = 3;
        }

        public void Use(Player p)
        {
            uses++;

            if (uses >= maxUses)
            	p.RemoveWeapon();
            
        }

        public int UsesRemaining
        {
            get { return maxUses-uses ; }
        }
    }
}
